<template>
    <el-container>
        <div>
            <Exs id="exs" width="1000px" height="500px"  ref="exs"></Exs>
        </div>
        
        <el-button @click="drawer = true" type="primary" style="margin-left: 16px;">
          点我打开
        </el-button>
        <el-drawer
          title="我是标题"
          :visible.sync="drawer"
          :direction="direction"
          :before-close="handleClose">
          <span>我来啦!</span>
        </el-drawer>
    </el-container>
</template>

<script>
import Exs from '../../components/Excels/Excel'; 
export default {
    name: '',
    components:{Exs},
    data(){
        return {
            drawer: false,
            direction: 'rtl',
        }
    },
    mounted () {
        this.selfAdaption()
    },
    methods: {
        selfAdaption () {
          let that = this
          setTimeout(() => {
            window.onresize = function () {
                if (that.$refs.exs) {
                    that.$refs.exs.resize()
                }
            }
          }, 10)
        },
        Test(){
            console.timeStamp();
        },
        handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
        }

    }//methods
}
</script>

<style>
    
</style>